text = gtk_entry_get_text (GTK_ENTRY (filesel->selection_entry));
if (text)
{
- sys_filename = g_filename_from_utf8 (cmpl_completion_fullname (text, filesel->cmpl_state), NULL);
+ sys_filename = g_filename_from_utf8 (cmpl_completion_fullname (text, filesel->cmpl_state), -1, NULL, NULL, NULL);
strncpy (something, sys_filename, sizeof (something));
g_free (sys_filename);
return something;
path = cmpl_reference_position (cmpl_state);
full_path = g_strconcat (path, G_DIR_SEPARATOR_S, dirname, NULL);
- sys_full_path = g_filename_from_utf8 (full_path, NULL);
+ sys_full_path = g_filename_from_utf8 (full_path, -1, NULL, NULL, NULL);
if (mkdir (sys_full_path, 0755) < 0)
{
buf = g_strconcat ("Error creating directory \"", dirname, "\": ",
path = cmpl_reference_position (cmpl_state);
full_path = g_strconcat (path, G_DIR_SEPARATOR_S, fs->fileop_file, NULL);
- sys_full_path = g_filename_from_utf8 (full_path, NULL);
+ sys_full_path = g_filename_from_utf8 (full_path, -1, NULL, NULL, NULL);
if (unlink (sys_full_path) < 0)
{
buf = g_strconcat ("Error deleting file \"", fs->fileop_file, "\": ",
new_filename = g_strconcat (path, G_DIR_SEPARATOR_S, file, NULL);
old_filename = g_strconcat (path, G_DIR_SEPARATOR_S, fs->fileop_file, NULL);
- sys_new_filename = g_filename_from_utf8 (new_filename, NULL);
- sys_old_filename = g_filename_from_utf8 (old_filename, NULL);
+ sys_new_filename = g_filename_from_utf8 (new_filename, -1, NULL, NULL, NULL);
+ sys_old_filename = g_filename_from_utf8 (old_filename, -1, NULL, NULL, NULL);
if (rename (sys_old_filename, sys_new_filename) < 0)
{
/* g_get_current_dir() returns a string in the "system" charset */
sys_getcwd_buf = g_get_current_dir ();
- utf8_cwd = g_filename_to_utf8 (sys_getcwd_buf, NULL);
+ utf8_cwd = g_filename_to_utf8 (sys_getcwd_buf, -1, NULL, NULL, NULL);
g_free (sys_getcwd_buf);
tryagain:
{
/* If no possible candidates, use the cwd */
gchar *sys_curdir = g_get_current_dir ();
- gchar *utf8_curdir = g_filename_to_utf8 (sys_curdir, NULL);
+ gchar *utf8_curdir = g_filename_to_utf8 (sys_curdir, -1, NULL, NULL, NULL);
g_free (sys_curdir);
{
/* ~/ */
gchar *homedir = g_get_home_dir ();
- gchar *utf8_homedir = g_filename_to_utf8 (homedir, NULL);
+ gchar *utf8_homedir = g_filename_to_utf8 (homedir, -1, NULL, NULL, NULL);
g_free (homedir);
cmpl_errno = errno;
return NULL;
}
- utf8_dir = g_filename_to_utf8 (pwd->pw_dir, NULL);
+ utf8_dir = g_filename_to_utf8 (pwd->pw_dir, -1, NULL, NULL, NULL);
result = open_dir (utf8_dir, cmpl_state);
g_free (utf8_dir);
}
path = g_string_sized_new (2*MAXPATHLEN + 10);
- sys_dir_name = g_filename_from_utf8 (dir_name, NULL);
+ sys_dir_name = g_filename_from_utf8 (dir_name, -1, NULL, NULL, NULL);
directory = opendir (sys_dir_name);
if (!directory)
return NULL;
}
- sent->entries[i].entry_name = g_filename_to_utf8 (dirent_ptr->d_name, NULL);
+ sent->entries[i].entry_name = g_filename_to_utf8 (dirent_ptr->d_name, -1, NULL, NULL, NULL);
g_string_assign (path, sys_dir_name);
if (path->str[path->len-1] != G_DIR_SEPARATOR)
}
}
- sys_dir_name = g_filename_from_utf8 (dir_name, NULL);
+ sys_dir_name = g_filename_from_utf8 (dir_name, -1, NULL, NULL, NULL);
if (stat (sys_dir_name, result) < 0)
{
g_free (sys_dir_name);
return TRUE;
}
- sys_filename = g_filename_from_utf8 (cmpl_dir->fullname, NULL);
+ sys_filename = g_filename_from_utf8 (cmpl_dir->fullname, -1, NULL, NULL, NULL);
if (stat (sys_filename, &sbuf) < 0)
{
g_free (sys_filename);
return TRUE;
}
- sys_filename = g_filename_from_utf8 (cmpl_dir->fullname, NULL);
+ sys_filename = g_filename_from_utf8 (cmpl_dir->fullname, -1, NULL, NULL, NULL);
if (stat (sys_filename, &sbuf) < 0)
{
g_free (sys_filename);
last_slash[1] = 0;
}
- sys_filename = g_filename_from_utf8 (cmpl_dir->fullname, NULL);
+ sys_filename = g_filename_from_utf8 (cmpl_dir->fullname, -1, NULL, NULL, NULL);
if (stat (sys_filename, &parbuf) < 0)
{
g_free (sys_filename);
gchar *sys_dirname;
sys_orig_dir = g_get_current_dir ();
- sys_dirname = g_filename_from_utf8 (dirname, NULL);
+ sys_dirname = g_filename_from_utf8 (dirname, -1, NULL, NULL, NULL);
if (chdir (sys_dirname) != 0 || chdir ("..") != 0)
{
g_free (sys_dirname);
g_free (sys_dirname);
sys_cwd = g_get_current_dir ();
- result = g_filename_to_utf8 (sys_cwd, NULL);
+ result = g_filename_to_utf8 (sys_cwd, -1, NULL, NULL, NULL);
g_free (sys_cwd);
if (chdir (sys_orig_dir) != 0)
while ((pwd_ptr = getpwent ()) != NULL)
{
- utf8 = g_filename_to_utf8 (pwd_ptr->pw_name, NULL);
+ utf8 = g_filename_to_utf8 (pwd_ptr->pw_name, -1, NULL, NULL, NULL);
len += strlen (utf8);
g_free (utf8);
- utf8 = g_filename_to_utf8 (pwd_ptr->pw_dir, NULL);
+ utf8 = g_filename_to_utf8 (pwd_ptr->pw_dir, -1, NULL, NULL, NULL);
len += strlen (utf8);
g_free (utf8);
len += 2;
goto error;
}
- utf8 = g_filename_to_utf8 (pwd_ptr->pw_name, NULL);
+ utf8 = g_filename_to_utf8 (pwd_ptr->pw_name, -1, NULL, NULL, NULL);
strcpy (buf_ptr, utf8);
g_free (utf8);
buf_ptr += strlen (buf_ptr);
buf_ptr += 1;
- utf8 = g_filename_to_utf8 (pwd_ptr->pw_dir, NULL);
+ utf8 = g_filename_to_utf8 (pwd_ptr->pw_dir, -1, NULL, NULL, NULL);
strcpy (buf_ptr, utf8);
g_free (utf8);